package org.example.design.designmode.decoratorpattern.sellbubbles;


/**
 * 通过门面模式对业务实现流程进行控制
 */
public class MenuFacade {


    public static void getmenuFacade(User u){
        Menu me = new Tourist();
        if("Tourist".equals(u.getRole())){

            System.out.println(me.getMenu());

        }
        if("user".equals(u.getRole())){
            me = new StudentDecorator(me);
            System.out.println(me.getMenu());
        }
        if("admin".equals(u.getRole())){
            me = new AdminDecorator(me);
            System.out.println(me.getMenu());
        }


    }
}
